//
//  TextSplitter.h
//  eBookr
//
//  Created by Zachary Brewster-Geisz on 9/26/07.
//  Copyright 2007 Zachary Brewster-Geisz. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface TextSplitter : NSObject {
	NSString *originalText; // can be HTML or text
	NSString *lowercaseText;
	NSDictionary *optionsDictionary;
	int splitType;
	NSString *splitString;
}

enum {splitOnH1, splitOnH2, splitOnCenter, splitOnChapter, splitOnNumeral, splitOnNumeralAndText, 
	splitOnOther, splitOnOtherAndText};

#define USER_SPLIT_STRING @"userSplitString"

#define SPLIT_TYPE_KEY @"splitTypeKey"

#define COMPUTE_FILE_NAME @"computeFileName"
#define USER_FILE_NAME @"userFileName"

#define USER_FILENAME_STRING @"userFilenameString"

#define FILENAME_TYPE_KEY @"filenameTypeKey"

- (TextSplitter *)initWithOptionsDictionary:(NSDictionary *)opts;
- (BOOL)splitFile:(NSString *)filePath toDirectory:(NSString *)dirPath;
- (BOOL)splitPlainText:(NSString *)filePath toDirectory:(NSString *)dirPath;
- (BOOL)splitHTML:(NSString *)filePath toDirectory:(NSString *)dirPath;
- (NSString *)getLineBreakCharacterForString:(NSString *)input;

@end
